<template>
  
  <son v-if="msg"></son>
</template>

<script setup>
import {ref,onBeforeMount,onMounted,onUpdated,onUnmounted} from 'vue'
import son from './components/son.vue'
const msg = ref('')
console.log(1);
onBeforeMount(()=>{
  console.log(2);
})
onMounted(()=>{
  console.log(3);
})
onUpdated(()=>{
  console.log('组件更新');
})
onUnmounted(()=>{
  console.log('子组件销毁');
})
</script>